package com.tedu.weibo.result;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 为每个状态码和描述信息定义枚举类
 * */
@AllArgsConstructor
@Getter
public enum Status {
    //为每一种不同业务处理结果定义枚举，表达对应的状态码和提示信息
    USERNAME_ERROR(1000,"用户名不存在"),
    PASSWORD_ERROR(1001,"密码错误"),
    USER_EXISTS(1002,"用户名已存在"),
    NOT_LOGIN(1003,"用户未登录"),
    OPERATION_SUCCESS(2001,"操作成功"),
    OPERATION_FAIL(2002,"操作失败"),
    UNKNOWN_ERROR(4000,"未知错误"),
    OPERATION_ERROR(4001,"操作错误"),
    VALIDATE_FAILED(4002,"参数校验失败");

    private Integer statusCode;
    private String message;

}
